<template name="people">
	<view>
		<view class="bg-gradual-blue padding radius text-center shadow-blur">
			<view class="flex padding justify-center">
				<view class="cu-avatar xl round logo"></view>
			</view>
			<view class="text-lg padding">
				<text class="text-black" user-select="true">{{ userInfo.name }}</text>
			</view>
		</view>
		<view class="cu-list menu card-menu margin-top">
			<view class="cu-item">
				<view class="content">
					<text class="cuIcon-circlefill text-grey"></text>
					<text class="text-grey">版本</text>
				</view>
				<view class="action">1.0.0</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userInfo: {
					name: '账号ID'
				}
			};
		},
		methods: {
			
		},
		onLoad() {
			let that = this;
			
			uni.request({
				url: that.baseUrl + "/info",
				data: {
					userId: uni.getStorageSync('mini_sfshare_key')
				},
				success(res) {
					if (res.statusCode == 200) {
						that.userInfo.name = res.data.NAME_;
					} else {
						uni.showToast({
							icon: 'none',
							title: '未能获取用户信息，请稍后再试！',
							duration: 1200
						});
					}
				},
				fail(res) {
					uni.showToast({
						icon: 'none',
						title: '服务器开了小差，请稍后再试！',
						duration: 1200
					});
				}
			});
		}
	};
</script>

<style>
	.logo {
		background-image:url('');
	}
</style>
